﻿using Ocelot.Configuration.File;
using Service.Core.AutoMapper;
using Service.Gateway.Domain.Db;

namespace Service.Gateway.Domain.Model
{
    [Map(typeof(ServiceRoute))]
    public class ServiceRouteDto
    {
        /// <summary>
        /// 网关标识
        /// </summary>
        public long Id { get; set; }

        /// <summary>
        /// 网关标识
        /// </summary>
        public long GatewayId { get; set; }


        /// <summary>
        /// 下游地址
        /// </summary>
        public string DownstreamPathTemplate { get; set; }

        /// <summary>
        /// 上游
        /// </summary>
        public string UpstreamPathTemplate { get; set; }

        /// <summary>
        /// 请求方法
        /// </summary>
        public List<string> UpstreamHttpMethod { get; set; }


        /// <summary>
        /// 请求限制
        /// </summary>
        public FileRateLimitRule RateLimitOptions { get; set; }
    }
}
